/*
 * Copyright © 2004-2014 chenYuan. All rights reserved.
 * @Website:wwww.jspx.net
 * @Mail:39793751@qq.com
 * @author: chenYuan , 陈原
 * @License: Jspx.net Framework Code is open source (LGPL)，Jspx.net Framework 使用LGPL 开源授权协议发布。
 * @jvm:jdk1.6+  x86/amd64
 *
 */
package com.jspx.scriptmark.core.block;

import com.jspx.scriptmark.core.TagNode;
/**
 * Created by IntelliJ IDEA.
 * User: chenYuan
 * Date: 2008-11-26
 * Time: 16:53:06
 */
public class CaseBlock extends TagNode
{
    final private static String WHERE = "where";
    final private static String W = "w";
    
    public CaseBlock()
    {

    }


    public String getWhere()
    {
        String s = getAttribute(WHERE);
        if (!com.jspx.utils.StringUtil.hasLength(s)) s = getAttribute(W);
        if (!com.jspx.utils.StringUtil.hasLength(s)) return null;
        return s.replaceAll(" lt ", "<").replaceAll(" le ", "<=").replaceAll(" gt ", ">").replaceAll(" ge ", ">=");
    }
}